/**
 * Handles encryption and decryption
 * TODO : This currently only encrypts the data to bytes and 
 * decrypts data bytes to strings. This must be implemented
 * @author - bigredshoes03
 * @date - 10/1/2009
 */
package main_serv;

public class EncryptionHandler {

	/**
	 * Encrypt via a key data to a byte array
	 * @param data - data to encrypt
	 * @return - byte array of data to send (encrypted via a key)
	 */
	public static byte[] encrypt(String data){
		return data.getBytes();
		
	}
	
	/**
	 * Decrypt via a key to a String  of data
	 * @param data - byte array to decrypt
	 * @return - decrypted string/data
	 */
	public static String decrypt(byte[] data){
		String retval = "";
		for(byte c : data){
			retval+=(char)c;
		}
		return retval;
	}
}
